﻿using System;
using System.Windows.Forms;

namespace GuidanceExplorer.Helpers
{
    public class DialogsHelper
    {
        public static SaveFileDialog GetSaveFileDialog(String title, String defaultExt)
        {
            
            SaveFileDialog saveFile = new SaveFileDialog();
            saveFile.CheckPathExists = true;
            saveFile.OverwritePrompt = true;
            saveFile.Title = title;
            saveFile.ValidateNames = true;
            saveFile.RestoreDirectory = true;
            

            return saveFile;
        }
        public static OpenFileDialog GetOpenFileDialog(String title, String filterFile, String fileName)
        {

            OpenFileDialog openFile = new OpenFileDialog();
            openFile.CheckPathExists = true;
            openFile.Filter =  filterFile;
            openFile.Title = title;
            openFile.ValidateNames = true;
            openFile.RestoreDirectory = true;

            openFile.FileName = fileName;
            return openFile;
        }
        public static FolderBrowserDialog GetFolderBrowserDialog(String selectedPath, String description)
        {
            FolderBrowserDialog fbd = new FolderBrowserDialog();
            fbd.SelectedPath = selectedPath;
            fbd.Description = description;
            return fbd;            
        }
    }
}
